20-4 Use ASRA within ASR Toolbox

In fact, we have integrate the functionality of SA into a MATLAB function waveAssess.m in the ASR toolbox. Please try the following example:

Example 1: waveAssess01.mwaveFile='what_would_you_like_to_know.wav'; text='what would you like to know'; language='english'; plotOpt=1; [cmObj, dosCmd]=waveAssess(waveFile, text, language, plotOpt); cmObj cmObj = <a href="matlab:helpPopup struct" style="font-weight:bold">struct</a> with fields: version: 'version 1.4 (2010/06/24)' text: {'what would you like to know'} syl: {} warningMessage: {} cm: [1×1 struct]

In the above example, waveAssess.m does invoke ASRA to do speech assessment, and then read the output file output.xml to get the word/phoneme boundaries and scores to draw the plot. To be specific,

Hint
You can click and drag on the plot within MATLAB to play the segmented utterance.

If you need to get the pitch of the utterance, try the following example:

Example 2: waveAssess02.mwaveFile='what_would_you_like_to_know.wav'; text='what would you like to know'; language='english'; plotOpt=1; pitchFile='test.pitch'; [cmObj, dosCmd]=waveAssess(waveFile, text, language, plotOpt, pitchFile); cmObj cmObj = <a href="matlab:helpPopup struct" style="font-weight:bold">struct</a> with fields: version: 'version 1.4 (2010/06/24)' text: {'what would you like to know'} syl: {} warningMessage: {} cm: [1×1 struct]

For spoken Chinese assessment, try this one:

Example 3: waveAssess03.mwaveFile='yi_cuen_xiang_s_yi_cuen_huei.wav'; text='一寸想思一寸灰'; language='chinese'; plotOpt=1; pitchFile='test.pitch'; [cmObj, dosCmd]=waveAssess(waveFile, text, language, plotOpt, pitchFile); cmObj cmObj = <a href="matlab:helpPopup struct" style="font-weight:bold">struct</a> with fields: version: 'version 1.4 (2010/06/24)' text: {'一寸想思一寸灰'} syl: {} warningMessage: {} cm: [1×1 struct]

Moreover, you can use the following scripts for demonstration: Try them, it's fun!
Audio Signal Processing and Recognition (音訊處理與辨識)